#pragma once

//#include "resource.h"
#define PKMP_DDE_WND_CLASS L"{22144FF6-F1E7-4c8f-B0F9-C5A211EBF717}"

void SetWindowRunBackGround(HWND hWnd, BOOL bBackground);
BOOL IsWindowRunBackGround(HWND hWnd);


class CPkmpModule : public CAppModule
{
public:
	CPkmpModule()
		: m_bShowMainUI(TRUE)
		, m_nCmdShow(-1)
	{
	}
	HRESULT Init(HINSTANCE hInstance);
    //HRESULT ParseCommandLine(LPCWSTR lpszCmdLine);
    UINT_PTR Main();
    BOOL CheckInstance();
    void SetActiveWindow(HWND hWndActive);
	LPCTSTR	GetAppFilePath();
	LPCTSTR GetAppDirPath();
    LPCTSTR GetProductVersion();
	int				  m_nCmdShow;
protected:
	CString m_strAppFileName;
    CString m_strAppPath;
    CString m_strAppVersion;
	CString		m_strInstallPID;
	CString     m_strOrgOem;
    LONG    m_lAppVersionNumber;

	void _InitUIResource();
	HANDLE _GetWindowProcess( HWND hWnd );

	 struct Pkmp_Instance_Data
    {
        HWND hActiveWnd;
    };
	BOOL	m_bShowMainUI;
    CAtlFileMapping<Pkmp_Instance_Data> m_mapping;
};

extern CPkmpModule _Module;